import Vue from 'vue'
import './plugins/axios'
import App from './App.vue'
import router from './router'
import './plugins/element.js'


// 引入Markdown编辑器
import VueMarkdownEditor from '@kangc/v-md-editor';
import '@kangc/v-md-editor/lib/style/base-editor.css';

import VMdPreview from '@kangc/v-md-editor/lib/preview';
import '@kangc/v-md-editor/lib/style/preview.css';

import vuepressTheme from '@kangc/v-md-editor/lib/theme/vuepress.js';
import '@kangc/v-md-editor/lib/theme/style/vuepress.css';

import createHighlightLinesPlugin from '@kangc/v-md-editor/lib/plugins/highlight-lines/index';
// 代码高亮插件 高亮语言在 babel.config.js
import Prism from 'prismjs';
// Markdown编辑器使用 vuepress主题
VMdPreview.use(vuepressTheme, {
  // 使用代码高亮插件
  Prism
})
VueMarkdownEditor.use(vuepressTheme, {
  Prism
})

// 引入element ui的组件

import {Image, Pagination} from 'element-ui'

import store from './store'

Vue.use(Image).use(Pagination)

//初始化全局事件总线
Vue.prototype.$EventBus = new Vue()


Vue.config.productionTip = false
Vue.use(VMdPreview)
Vue.use(VueMarkdownEditor)
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
